<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<h3 class="mt10">${processTemplate.processName}</h3>

<div class="mt10"></div>
<div data-id="accordion">
    <div title="选择工件">
        <div class="panel-inner">
            <a href="javascript:void(0)" data-id="addTool" class="ml10 mt10" iconCls="fa fa-plus">添加工件</a>

            <div class="selected-tool" data-id="tool-box-form">
                <div data-id="showALl" style="display: none">
                    由于未选择工件，系统将默认选择满足搜索条件的所有工件，当前的条件下满足的工件个数为<span data-id="total"></span>个，
                    <a href="javascript:void(0)" data-id="showCon" iconCls="fa fa-eye fa-lg"
                       plain="true">查看满足条件的工件</a>
                </div>
                <div class="tool-box" data-id="tool-box">
                    <c:if test="${not empty ebom}">
                        <div data-id="ebom-item" class="ebom-item" data-item="${ebom.id}">
                            <div class="float-right">
                                <a href="javascript:void(0)" iconCls="fa fa-trash fa-lg" plain="true"></a>
                            </div>
                            <span>名称/编码：</span>${ebom.eName}/${ebom.code}
                        </div>
                    </c:if>
                </div>
                <textarea data-id="hiddenTextArea" style="display: none"></textarea>
            </div>
            <div class="mt10" style="padding: 10px;">
                <a href="javascript:void(0)" iconCls="fa fa-check fa-lg" data-type="gotoParam" data-id="btn">开始填写实验参数</a>
                <a data-type="cancel" data-id="btn" href="javascript:void(0)" iconCls="fa fa-remove fa-lg">取消</a>
            </div>
        </div>
    </div>
    <div title="填写实验参数" style="display: none">
        <div class="level-wrap" style="width: 98%;overflow: hidden">
            <table style="width: 100%;margin: 0 auto">
                <tr>
                    <td style="vertical-align: top;width: 70%">
                        <div class="job-panel-wrap" style="vertical-align: top">
                            <div data-id="panelC" data-options="title:'基础信息'">
                                <div class="box_tc_s job-detail">
                                    <form data-id="baseRecord">
                                        <input type="hidden" name="tProcessTemplate.id" value="${processTemplate.id}"/>
                                        <table border="1" class="hydra-table" cellpadding="0" cellspacing="0">
                                            <tr class="hydra-tr-bg" style="border-bottom: 1px dotted #ccc">
                                                <td class="hydra-left">操作人员：</td>
                                                <td class="hydra-right">
                                                    <textarea data-id="innerUser" name="operator" style="width: 230px"
                                                              data-options="require:true,validType:['length[0,400]']"
                                                           class="easyui-validatebox hydra-textarea">${loginUser.userName}</textarea>
                                                    <a href="javascript:void(0)" data-id="chooseUser" style="vertical-align: top;margin-left: 10px;"
                                                       iconCls="fa fa-plus">选择用户</a>
                                                </td>
                                            </tr>
                                            <tr class="hydra-tr-bg" style="border-bottom: 1px dotted #ccc">
                                                <td class="hydra-left">操作时间：</td>
                                                <td class="hydra-right" style="border-bottom: 1px dotted #ccc">
                                                    <input type="text" data-id="operateTime"
                                                           name="operateTime" class="easyui-validatebox hydra-input-width"
                                                           data-options="require:true,validType:['length[0,20]']"
                                                           placeholder="操作时间.." value=""/>
                                                </td>
                                            </tr>
                                            <tr class="hydra-tr-bg" style="border-bottom: 1px dotted #ccc">
                                                <td class="hydra-left">执行结果：</td>
                                                <td class="hydra-right">
                                                    <input type="text" data-id="result"
                                                           name="result" class="easyui-validatebox hydra-input-width"
                                                           data-options="require:true,validType:['length[0,200]']"
                                                           placeholder="执行结果.." value=""/>
                                                </td>
                                            </tr>
                                        </table>
                                    </form>
                                </div>
                            </div>
                        </div>
                        <div class="job-panel-wrap" style="vertical-align: top">
                            <div data-id="panelA"
                                 data-href="${pageContext.request.contextPath}/app/api/process/detail?id=${processTemplate.id}">
                            </div>
                        </div>
                        <c:if test="${processTemplate.useDevice eq 1 and not empty processTemplate.device}">
                            <div class="job-panel-wrap" style="vertical-align: top">
                                <form data-id="experFrom">
                                    <div data-id="panelB"
                                         data-href="${pageContext.request.contextPath}/app/api/process/gotoParse?code=${processTemplate.device.parser}">

                                    </div>
                                </form>
                            </div>
                        </c:if>
                        <div style="padding: 10px">
                            <a data-type="save" data-id="btn" href="javascript:void(0)" iconCls="fa fa-check fa-lg">保存工艺执行参数</a>
                            <a data-type="goSelect" data-id="btn" href="javascript:void(0)" iconCls="fa fa-reply fa-lg">继续选择工件</a>
                            <a data-type="cancel" data-id="btn" href="javascript:void(0)" iconCls="fa fa-remove fa-lg">取消</a>
                        </div>
                    </td>
                    <td style="vertical-align: top;width: 30%">
                        <div class="job-panel-wrap">
                            <c:if test="${hasRecord}">
                                <div data-id="same-ebom">
                                    <div class="grid-wrap" style="margin-top: 0;min-height: 300px">
                                        <table data-id="grid"></table>
                                    </div>
                                    <div data-id="user_list_btn">
                                        <a data-href="#" data-id="{{id}}" data-key="view" iconCls="fa fa-eye fa-lg"
                                           plain="true">查看</a>
                                        <a data-href="#" data-id="{{id}}" data-key="use" iconCls="fa fa-share fa-lg"
                                           plain="true">应用该记录</a>
                                    </div>
                                </div>
                            </c:if>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        <div class="mt10"></div>
    </div>
</div>